<%--
  Created by IntelliJ IDEA.
  User: 75230
  Date: 2022-9-18
  Time: 23:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>$Title$</title>
    <script>
        onload = function () {
            btn1 = document.getElementById("btn1");
            ename = document.getElementById("ename");
            dname = document.getElementById("dname");
            btn2 = document.getElementById("btn2");
            btn1.onclick = function () {
                var name = ename.value;
                location.href = "/deleteEmp?ename=" + name;
            }
            btn2.onclick = function () {
                var name = dname.value;
                location.href = "/deleteDept?dname=" + name
            }
        }
    </script>
</head>
<body>
<h1>员工信息管理后台</h1>
<hr>
<a href="/findEmpAll">查询所有员工信息</a><br>
<a href="/findDeptAll">查询所有部门信息</a><br>
<a href="/addEmp.html">添加员工</a><br> <%--添加页面自己实现--%>
<a href="/addDep.html">添加部门</a><br> <%--添加页面自己实现--%>
<hr>
输入员工名称：<input type="text" name="ename" id="ename"><br>
<button id="btn1"> 点击按钮删除员工</button>
<hr>
输入部门名称: <input type="text" name="dname" id="dname"><br>
<button id="btn2">点击按钮删除部门</button>
</body>

</html>
